# Maintainer: Ivy Foster <iff@archlinux.org>

pkgname=translate-shell
pkgver=0.9.7
pkgrel=1
pkgdesc='A command-line interface and interactive shell for Google Translate'
arch=(any)
url='https://www.soimort.org/translate-shell/'
license=(Unlicense)
depends=(bash gawk)
makedepends=(git)
optdepends=(
	'aspell: spell checking'
	'curl: openSSL support'
	'emacs: Emacs interface'
	'espeak-ng: Text-to-Speech functionality'
	'fribidi: display right-to-left languages'
	'hunspell: spell checking'
	'less: terminal paging'
	'mpg123: Text-to-Speech functionality'
	'mplayer: Text-to-Speech functionality'
	'mpv: Text-to-Speech functionality'
	'rlwrap: readline-style editing and history in the interactive mode'
)

# They do offer a sha1sum and a PGP signature on their homepage,
# but they're only for the standalone script, not for the whole package.
# Easiest thing at this point is to pin to release commits on github,
# since they do sign their commits.
source=('git+https://github.com/soimort/translate-shell.git#commit=a3bba39fb1dd40b10cfefac71dabdba14e4f76d0?signed')
md5sums=(SKIP)
validpgpkeys=(8A9CA65383B671BC995CCEAE07DA00CB78203251)

build() {
	cd translate-shell
	make
}

package() {
	cd translate-shell
	make PREFIX=/usr DESTDIR="$pkgdir" install
}
